﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using COMOSOFT.Production.Report;
using DevExpress.XtraReports.UI;
using DevExpress.LookAndFeel;

namespace COMOSOFT.ShippingManagement.USC
{
    public partial class UscrptInvoice : UserControl
    {
        string strType;
        int iInvID;
        rpt_InvLC rptLC;
        rpt_InvTTDP rptTTDP;
        public UscrptInvoice(int _invid, string _type)
        {
            InitializeComponent();
            this.strType = _type;
            this.iInvID = _invid;
        }
        public void LoadData()
        {
            if (strType == "LC")
            {
                rptLC = new rpt_InvLC(iInvID);                
                documentViewer1.DocumentSource = rptLC;
            }
            else
            {
                rptTTDP = new rpt_InvTTDP(iInvID);               
                documentViewer1.DocumentSource = rptTTDP;              
            }
        }
    }
}
